//
//  JHBookUnitDetailView.h
//  JuniRengLish_iOS
//
//  Created by Maiyou on 2019/5/16.
//  Copyright © 2019 revogi. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol JHBookUnitDetailViewDelegate <NSObject>

- (void)playEnd:(id)unitView;

//点击当前行进行播放
- (void)selectRowPlay:(AVPlayer *)player;

@end

@interface JHBookUnitDetailView : UIView <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) UITableView * tableView;

@property (nonatomic, copy) NSString * textFileName;
@property (nonatomic, copy) NSString * mp3Name;
@property (nonatomic, copy) NSString * bookid;
@property (nonatomic, assign) BOOL isBook;
/** 是否显示翻译 */
@property (nonatomic, assign) BOOL isTranslate;

@property (nonatomic, strong) NSMutableArray * dataArray;
@property (nonatomic, strong) AVPlayer * player;
@property (nonatomic, strong) UIViewController * currentVC;

@property (nonatomic, weak) id<JHBookUnitDetailViewDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
